package main

import "fmt"

var arr [5]int = [5]int{0: 1, 4: 5}

func main() {
	demo1()
	demo2()
}

func demo1() {
	for i, v := range arr {
		fmt.Printf("index=%d,val=%v\n", i, v)
	}
}

func demo2() {
	for i := 0; i < len(arr); i++ {
		fmt.Printf("index=%d,val=%v\n", i, arr[i])
	}
}
